<template>
  <div>
    <h3>Susponse</h3>
    <img :src="address" alt="">
    <button @click="getPhoto">换一张图片</button>
  </div>
</template>

<script setup lang='ts' name="Susponse">
import axios from 'axios';
import { ref, reactive } from 'vue'

// let address = ref('https://images.dog.ceo/breeds/pembroke/n02113023_4373.jpg')
async function getPhoto(){
    address.value =  ""
    const res = await axios.get("https://dog.ceo/api/breed/pembroke/images/random")
    console.log(res.data.message);
    
    address.value = res.data.message

}
const res = await axios.get("https://dog.ceo/api/breed/pembroke/images/random")
let address = ref(res.data.message)



</script>


<style lang='scss' scoped>

</style>